<template>
	<span>
		<Button type="error" @click="modal1 = true">删除</Button>
		<Modal
			v-model="modal1"
			title="你确定要删除此列？"
			@on-ok="ok"
			@on-cancel="cancel">
			<p>你确定要删除此列？</p>
		</Modal>
	</span>
</template>

<script>
export default{
	data(){
		return{
			modal1:false
		}
	},
	props:['id','port','getThatFun'],
	methods:{
			ok(){
				var _self = this,base_url='/helsinki/admin/';
				$.post(base_url + _self.port,{id: _self.id},function(res) {
					if (res.errcode == 0) {
						_self.$Message.info(res.info);
						_self.getThatFun(1);
					} else {
						_self.$Message.info(res.info);
					}
				});
			},
			cancel(){
				// this.$Message.info('Clicked cancel');
			}
		}
}
</script>

<style>
</style>